package com.kgc.basic.remote;

import com.kgc.basic.pojo.Provider;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

public interface ProviderRemote {
    @RequestMapping("/selectProviderByPage")
    @ResponseBody
    ResponseMsg selectProviderByPage(@RequestBody Map<String, Object> map);

    @RequestMapping("/insertProvider")
    @ResponseBody
    ResponseMsg insertProvider(@RequestBody Provider provider);

    @RequestMapping("/updateProvider")
    @ResponseBody
    ResponseMsg updateProvider(@RequestBody Provider provider);

    @RequestMapping("/deleteProvider")
    @ResponseBody
    ResponseMsg deleteProvider(@RequestParam("id") int id);

    //校验编码是否重复
    @RequestMapping("selectProviderByCode")
    @ResponseBody
    ResponseMsg selectCustomerByCode(@RequestParam("code") String code);

    //查询所有供应商
    @RequestMapping("selectAllSupplier")
    @ResponseBody
    ResponseMsg selectAllSupplier();

    //
    @RequestMapping("getProviderAllByData")
    @ResponseBody
    ResponseMsg getProviderAllByData();
}
